package com.cskaoyan.exception;

import com.cskaoyan.bean.vo.BaseRespVo;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ProjectException {

    @ExceptionHandler({IncorrectCredentialsException.class,UnknownAccountException.class})
    public BaseRespVo doException(Exception ex){
        ex.printStackTrace();
        return BaseRespVo.fail("密码或帐号错误");

    }


}
